﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace InTREPWP.Views
{
    public partial class Busca : BasePage
    {
        public Busca()
        {
            InitializeComponent();
        }

        private void btnBuscar_Click(object sender, RoutedEventArgs e)
        {
            var filtro = txtFiltro.Text;

            if (txtFiltro.Text.Equals("digite aqui..."))
                filtro = String.Empty;

            NavigationService.Navigate(new Uri("/Views/Embarques.xaml?filtro=" + filtro, UriKind.Relative));
        }

        private void txtFiltro_GotFocus(object sender, RoutedEventArgs e)
        {
            if (txtFiltro.Text.Equals("digite aqui..."))
                txtFiltro.Text = String.Empty;
            else
                txtFiltro.SelectAll();
        }
    }
}